package com.xiaomi.by_spring;

public class Coffee {
    private String name;

    //1.使用构造器注入
    public Coffee(String name) {
        this.name = name;
    }

    //2.使用setter注入
//    public void setName(String name) {
//        this.name = name;
//    }
    public String getName() {
        return name;
    }
}
